body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}
.header {
    background-color: cornflowerblue;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}
.header .admin-info {
    display: flex;
    align-items: center;
}
.header .admin-info img {
    border-radius: 50%;
    margin-right: 10px;
}
.header .admin-info .time {
    margin-left: 20px;
}
.header .title {
    flex-grow: 1;
    text-align: center;
    font-size: 20px;
}
.sidebar {
    background-color: #333;
    color: white;
    width: 200px;
    height: 100vh;
    position: fixed;
    top: 60px;
    left: 0;
    padding-top: 20px;
}
.sidebar a {
    display: flex;
    align-items: center;
    color: white;
    padding: 15px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.sidebar a:hover {
    background-color: cornflowerblue;
}
.sidebar .material-icons {
    margin-right: 10px;
}
.content {
    margin-left: 200px;
    padding: 80px 20px 20px 20px;
}
.content {
    display: none;
}
.content.active {
    display: block;
}
.logout {
    cursor: pointer;
    margin-right: 40px;
}

.user-management {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.user-management h1 {
    color: cornflowerblue;
}
.search-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.search-bar input[type="text"] {
    width: 70%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;

}
.search-bar button {
    background-color: cornflowerblue;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;

}
.search-bar button:hover {
    background-color: #6495ed;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
table, th, td {
    border: 1px solid #ddd;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center; /* 水平居中 */
    vertical-align: middle; /* 垂直居中 */
}
th {
    background-color: cornflowerblue;
    color: white;
}
td img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}
.capsule-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
.capsule-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: cornflowerblue;
}
input:checked + .slider:before {
    transform: translateX(14px);
}
.pagination {
    display: flex;
    justify-content: center;
}
.pagination button {
    background-color: cornflowerblue;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 5px;
}
.pagination button:hover {
    background-color: #6495ed;
}

.user-delete-btn, .goods-delete-btn, .secKill-delete-btn {
    background-color: #ff4d4d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.avatar-option {
    cursor: pointer;
    margin: 10px;
    width: 100px; /* 设置统一宽度 */
    height: 100px; /* 设置统一高度 */
    border-radius: 50%; /* 设置为圆形 */
    object-fit: cover; /* 保持图片的纵横比 */
}

.editable {
    cursor: pointer;
    width: 7%;
}

.editable input {
    width: 100%;
    box-sizing: border-box;
    padding: 4px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.avatar-option {
    cursor: pointer;
    margin: 10px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}
form div {
    margin-bottom: 15px;
}
form label {
    display: inline-block;
    width: 80px;
}
form input, #category {
    width: calc(100% - 90px);
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
form button {
    padding: 10px 20px;
    background-color: cornflowerblue;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
form button:hover {
    background-color: #6495ed;
}

.search {
    display: flex;
    height: 40px;
    width: 400px;
}

.searchBtn {
    margin-left: 10px;
}

#pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#pagination button {
    background-color: cornflowerblue;
    color: white;
    border: 2px solid cornflowerblue;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

#pagination button:hover {
    background-color: white;
    color: cornflowerblue;
}

#pagination button:disabled {
    background-color: lightgray;
    border: 2px solid lightgray;
    cursor: not-allowed;
}

.category-select {
    background-color: white;
    border: 1px solid cornflowerblue;
    padding: 5px;
    font-size: 14px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
}


input[type="file"] {
    margin: 8px 0;
}

input[type="submit"] {
    width: 100%;
    background-color: cornflowerblue;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #3a7bd5;
}


#image {
    width: 100px;
    height: 100px;
    border-radius: 10px; /* 圆角矩形 */
    transform: translateY(15px);
    margin-left: 5px;
}

.tooltip {
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the text */
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    font-size: 14px;
    background-color: #f9f9f9;
    color: #333;
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
}

.chat-window {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    width: 1270px;
    height: 650px;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.chat-header {
    border-bottom: 1px solid #ccc;
    text-align: center;
    font-size: 1.2em;
    color: #333;
}
.chat-body {
    flex: 1;
    overflow-y: auto;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.chat-body {
    flex: 1;
    overflow-y: auto;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.chat-message {
    display: flex;
    align-items: flex-end;
    margin: 10px 0;
}
.chat-message.admin {
    justify-content: flex-end;
}
.chat-message.user {
    justify-content: flex-start;
}
.chat-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
}
.chat-message .message-content {
    max-width: 70%;
    padding: 10px;
    border-radius: 10px;
    background-color: #e1e1e1;
    color: #333;
    word-wrap: break-word;
}
.chat-message.admin .message-content {
    background-color: #007bff;
    color: #fff;
}
.chat-footer {
    display: flex;
    gap: 10px;
}
.chat-footer input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.chat-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}
.chat-footer button:hover {
    background-color: #0056b3;
}